< previous page page_324 next page >

Page 324
this method logs events to a Rich Text Box that is contained in the form, frmLog. The Rich Text Box was chosen as the preferred approach because of its ease of creating and accessing files. You'll learn more about this nice little feature of the Rich Text Box in Chapter 17, The File Operations Subsystem. If you want to use another Rich Text Box control, first invoke the setRichTextBox method, passing in the control.
The methods addTrans2List logs events to a list box on any form. Invoke the setListBox first, passing in the list box to house the events. The showLog and hideLog methods, respectively, show and hide the form, frmLog. The printLog method prints the contents of the Rich Text Box on the form, frmLog. The saveLog method saves the contents of the Rich Text Box on frmLog.
Returns
The CApplication class's initializeSystem method returns a Byte. This Byte value can be any special numeric identifier that indicates the state of the application initialization process. The values are yours to implement.
The Properties
The CApplication class has a State property that is accessed and set via the getState and setState methods. The AppTransactions class has a property, pTransLogIsOn, that is a boolean. It lets clients know whether events are being logged. This is useful in those classes with methods that process errors but might or might not want to have them recorded.
Incorporating the Subsystem into the Samsona Bank Teller System Example
After the many conversations with the branch manager of the Second Bank of Carrollton, you're relieved that you don't have much to discuss in how to implement this subsystem. She tells you that because the auditors run queries on the existing database for some transactions, not every event needs logging. She does want the login and logoff events recorded, as well as new account openings, deposits, and withdrawals. That's all.
In the modMain module, you need the following declaration:
Global theApplication As New CApplication

 
< previous page page_324 next page >

If you like this book, buy it!